
apiVersion: v1
kind: Service
metadata:
    name: rm-svc
    namespace: spark-cluster
spec:
    type: NodePort
    ports:
        - port: 8080
          targetPort: 8080
          nodePort: 30085
          name: rm-web
        - port: 22
          targetPort: 22
          name: rm-ssh
    selector:
        name: rm


---
apiVersion: v1
kind: ReplicationController
metadata:
    name: rm-rc
    namespace: spark-cluster
spec:
    replicas: 1
    template:
        metadata:
            labels:
                name: rm
        spec:
            containers:
            - image: index.tenxcloud.com/zhangshun/rm:longsys
              name: rm
              env:
                - name: PORTAL_SERVER
                  value: portal-svc
                - name: PORTAL_PORT
                  value: 80
                - name: ENABLE_TENANT_POOL
                  value: false
              ports:
              - containerPort: 8080
                name: rm-web
              - containerPort: 22
                name: rm-ssh

